Repository navigation
feat(contrib/confluentinc/confluent-kafka-go): add otelc support - #5754
gh-worker-dd-mergequeue-cf854d[bot] merged 20 commits into
Conversation
Config Audit |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 89a26ca | Docs | View more details | Give us feedback! |
BenchmarksBenchmark execution time: 2026-11-25 18:28:55 Comparing candidate commit 89a26ca in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 416 metrics, 0 unstable metrics.
|
…/otelc-confluent-kafka-go
…d add the otelc modules to the CI classifier
…ter hook for the consumer commit methods
…sts with harness cases
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f32a175990
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Kafka clients created during package initialization permanently cache pre-startup service and operation names. Channel consumers also have a shutdown data race when Kafka’s internal Poll calls invoke the new tracing hooks.
🤖 Bits Code Review · Commit f32a175
kakkoyun
left a comment
There was a problem hiding this comment.
One question before I approve. The three commit rules call TrackCommitOffsets and TrackHighWatermarkOffset, which return at once unless Data Streams Monitoring is on, and no suite turns it on. So a typo in those rules still passes every test. Could one case enable Data Streams Monitoring and check the commit offsets, for v1 and v2?
…e span when Produce has no delivery channel
…t through a function value are not traced
There was a problem hiding this comment.
The PR adds otelc tracing for Kafka v1/v2; this update fixes v1 span completion with nil delivery channels but introduces a producer-shutdown panic and ignores disabled delivery reports. Earlier defects remain open: package-initialized clients cache pre-startup service/operation names, and channel-consumer shutdown races on span state.
🤖 Bits Code Review · Commit 58b0451
…nsumers that read the events channel under otelc
kakkoyun
left a comment
There was a problem hiding this comment.
One addition to my question on the commit rules: producer_events also only matters with Data Streams Monitoring, because Events() returns the producer's own channel unless it is on. So the same DSM case would cover it.
… offsets that the commit and Events rules track
kakkoyun
left a comment
There was a problem hiding this comment.
The Data Streams test works: breaking kafkav1_consumer_commit_message, kafkav1_consumer_commit_offsets or kafkav1_producer_events now fails it. Breaking kafkav1_consumer_commit still passes, because the consumer config leaves enable.auto.commit on: Close commits the stored offset, and the Poll hook records that commit. With "enable.auto.commit": false in consumerConfig, the suite still passes, and the Commit case fails when the rule is broken. The v2 test has the same setup.
…ka-go integration consumers
…otelc-confluent-kafka-go # Conflicts: # .github/ci-components.yml # .github/workflows/otelc.yml # internal/apps/otelc-external-app/go.mod # internal/apps/otelc-external-app/go.sum # internal/orchestrion/_integration/go.mod # otelc/all/go.mod # otelc/all/go.sum # otelc/all/otel.instrumentation.go
…otelc-confluent-kafka-go # Conflicts: # internal/apps/otelc-external-app/go.mod # internal/apps/otelc-external-app/go.sum # internal/orchestrion/_integration/go.mod # otelc/all/go.mod # otelc/all/go.sum
There was a problem hiding this comment.
The PR adds Kafka v1/v2 otelc tracing and fixes nil-delivery span completion and the consumer-shutdown race. Still open are pre-startup configuration caching, producer-shutdown panics, ignored disabled delivery reports (the producer defects are tracked in #5900), and a newly committed unused 70.9 MB executable.
Remove the unused generated executable
git cat-file confirms the newly tracked internal/apps/otelc-external-app/otelcexternalapp contains 70,915,938 bytes, and file identifies it as a macOS/arm64 executable. The validation script rebuilds the fixture from source to /dev/null, so the binary is unused and unnecessarily adds roughly 71 MB to normal repository checkouts, including CI. Remove the generated executable from the patch.
Was this helpful? React 👍 or 👎
🤖 Bits Code Review · Commit 8bbe5c3
…otelc-confluent-kafka-go # Conflicts: # internal/apps/otelc-external-app/go.sum # otelc/all/go.sum
…der private aliases
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
What does this PR do?
Adds otelc support for confluent-kafka-go v1 and v2. Producers and consumers the application creates with
kafka.NewProducerandkafka.NewConsumerare traced the same way as with Orchestrion, including clients created in dependencies and in package main.The client methods are hooked where the library defines them, and the hooks only trace clients registered where the application creates them. Clients built with the contrib are left to the contrib, so they get one span per message instead of the two Orchestrion reports. The contrib's wrapper methods are split into before and after halves that the hooks reuse. Producer spans also get the bootstrap servers tag, as with the contrib's own
NewProducer.The hooks import the contrib and follow dd-trace-go's configuration, not
OTEL_GO_ENABLED_INSTRUMENTATIONS/OTEL_GO_DISABLED_INSTRUMENTATIONS.Known gap: a client the application also wraps with
WrapProducerorWrapConsumeris still traced twice, as with Orchestrion.Motivation
Move integrations from Orchestrion to otelc.
Reviewer's Checklist
make lintlocally.make testlocally.make generatelocally.make fix-moduleslocally.Unsure? Have a question? Request a review!